home *** CD-ROM | disk | FTP | other *** search
- class WarningArray extends Array
- {
- var warning;
- function WarningArray()
- {
- super();
- if(arguments.length > 1)
- {
- this.splice.apply(this,[0,0].concat(arguments));
- }
- else if(arguments.length == 0)
- {
- var _loc4_ = 0;
- while(_loc4_ < arguments[0])
- {
- this[_loc4_] = undefined;
- _loc4_ = _loc4_ + 1;
- }
- }
- }
- function checkWarning(d)
- {
- if(this.length > 0)
- {
- var _loc2_ = 0;
- while(d < this[_loc2_].d)
- {
- _loc2_ = _loc2_ + 1;
- }
- if(_loc2_ < this.length)
- {
- this.warning.gotoAndPlay(this.shift().t);
- }
- }
- }
- function copy()
- {
- var _loc2_ = new WarningArray();
- for(var _loc3_ in this)
- {
- _loc2_[_loc3_] = this[_loc3_];
- }
- return _loc2_;
- }
- function warningSort()
- {
- this.sort(WarningArray.distSort);
- }
- function toString()
- {
- return this.join(",\n");
- }
- static function distSort(a, b)
- {
- if(a.d > b.d)
- {
- return 1;
- }
- if(a.d < b.d)
- {
- return -1;
- }
- return 0;
- }
- }
-